/*
 * yCommon.h
 *
 *  Created on: Sep 14, 2016
 *      Author: root
 */

#ifndef BASE_YCOMMON_H_
#define BASE_YCOMMON_H_
#ifndef NULL
#define NULL 0
#endif
#ifndef SAFE_DELETE
#define SAFE_DELETE(p) { if(p){delete(p);  (p)=NULL;} }

#endif

#ifndef SAFE_DELETE_ARRAY

#define SAFE_DELETE_ARRAY(p) { if(p){delete[] (p);  (p)=NULL;} }

#endif

#endif /* BASE_YCOMMON_H_ */
